Ví dụ RSS_(định_dạng_tập_tin)

Đây là ví dụ về tập tin RSS 1.0.

 1 <?xml version="1.0"?> 2  3 <rdf:RDF  4   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 5   xmlns="http://purl.org/rss/1.0/"> 6  7   <channel rdf:about="http://www.xml.com/xml/news.rss"> 8     <title>XML.com</title> 9     <link>http://xml.com/pub</link>10     <description>11       XML.com features a rich mix of information and services 12       for the XML community.13     </description>14     <image rdf:resource="http://xml.com/universal/images/xml_tiny.gif" />15     <items>16       <rdf:Seq>17         <rdf:li resource="http://xml.com/pub/2000/08/09/xslt/xslt.html" />18         <rdf:li resource="http://xml.com/pub/2000/08/09/rdfdb/index.html" />19       </rdf:Seq>20     </items>21     <textinput rdf:resource="http://search.xml.com" />22   </channel>23 24   <image rdf:about="http://xml.com/universal/images/xml_tiny.gif">25     <title>XML.com</title>26     <link>http://www.xml.com</link>27     <url>http://xml.com/universal/images/xml_tiny.gif</url>28   </image>29 30   <item rdf:about="http://xml.com/pub/2000/08/09/xslt/xslt.html">31     <title>Processing Inclusions with XSLT</title>32     <link>http://xml.com/pub/2000/08/09/xslt/xslt.html</link>33     <description>34      Processing document inclusions with general XML tools can be 35      problematic. This article proposes a way of preserving inclusion 36      information through SAX-based processing.37     </description>38   </item>39 40   <item rdf:about="http://xml.com/pub/2000/08/09/rdfdb/index.html">41     <title>Putting RDF to Work</title>42     <link>http://xml.com/pub/2000/08/09/rdfdb/index.html</link>43     <description>44      Tool and API support for the Resource Description Framework 45      is slowly coming of age. Edd Dumbill takes a look at RDFDB, 46      one of the most exciting new RDF toolkits.47     </description>48   </item>49 50   <textinput rdf:about="http://search.xml.com">51     <title>Search XML.com</title>52     <description>Search XML.com's XML collection</description>53     <name>s</name>54     <link>http://search.xml.com</link>55   </textinput>56 </rdf:RDF>

Đây là ví dụ về tập tin RSS 2.0.

 1  <?xml version="1.0"?> 2  <rss version="2.0"> 3    <channel> 4      <title>Birthday Bash Interviews</title> 5      <link>http://kccnfm100.com/</link> 6      <description>Natural Vibrations.</description> 7      <language>en-us</language> 8      <pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate> 9  10      <lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate>11      <docs>http://blogs.law.harvard.edu/tech/rss</docs>12      <generator>Weblog Editor 2.0</generator>13      <managingEditor>editor@example.com</managingEditor>14      <webMaster>webmaster@example.com</webMaster>15      16      <item>17        <title>Star City</title>18        <link>http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp</link>19        <description>How do Americans get ready to work with Russians aboard the20          International Space Station? They take a crash course in culture, language21          and protocol at Russia's Star City.</description>22        <pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>23        <guid>http://liftoff.msfc.nasa.gov/2003/06/03.html#item573</guid>24      </item>25      26      <item>27        <description>Sky watchers in Europe, Asia, and parts of Alaska and Canada28          will experience a partial eclipse of the Sun on Saturday, May 31st.</description>29        <pubDate>Fri, ngày 30 tháng 5 năm 2003 11:06:42 GMT</pubDate>30        <guid>http://liftoff.msfc.nasa.gov/2003/05/30.html#item572</guid>31      </item>32      33      <item>34        <title>The Engine That Does More</title>35        <link>http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp</link>36        <description>Before man travels to Mars, NASA hopes to design new engines37          that will let us fly through the Solar System more quickly.  The proposed38          VASIMR engine would do that.</description>39        <pubDate>Tue, ngày 27 tháng 5 năm 2003 08:37:32 GMT</pubDate>40        <guid>http://liftoff.msfc.nasa.gov/2003/05/27.html#item571</guid>41      </item>42      43      <item>44        <title>Astronauts' Dirty Laundry</title>45        <link>http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp</link>46        <description>Compared to earlier spacecraft, the International Space47          Station has many luxuries, but laundry facilities are not one of them.48          Instead, astronauts have other options.</description>49        <pubDate>Tue, ngày 20 tháng 5 năm 2003 08:56:02 GMT</pubDate>50        <guid>http://liftoff.msfc.nasa.gov/2003/05/20.html#item570</guid>51      </item>52    </channel>53  </rss>